package com.tbit.uqbike.webmanager.dto;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.tbit.common.constant.OperationPlatform;
import com.tbit.uqbike.annos.Excel;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.FieldNameConstants;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 用户操作日志
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class UserOpLogDTO implements Serializable {

    private static final long serialVersionUID = 7008879210892978263L;
    /**
     * 操作内容
     */
    @Excel(name = "操作内容", sort = 4)
    private String operation;

    /**
     * 操作类型
     */
    @Excel(name = "操作类型", sort = 5)
    private String opType;

    /**
     * 操作人
     */
    @Excel(name = "操作人", sort = 0)
    private String opUser;

    /**
     * 操作人手机号
     */
    @Excel(name = "操作人手机号", sort = 1)
    private String opUserPhone;

    /**
     * 被操作人
     */
    @Excel(name = "被操作人", sort = 2)
    private String targetUser;

    /**
     * 被操作人手机号
     */
    @Excel(name = "被操作人手机号", sort = 3)
    private String targetUserPhone;

    /**
     * 操作平台 1-用户端 2-管理端 3-运维端
     *
     * @see OperationPlatform
     */
    @Excel(name = "操作平台", sort = 6,readConverterExp = "1=小程序客户端,2=管理平台,3=运维APP")
    private Integer opPlatform;

    /**
     * 操作结果
     */
    @Excel(name = "操作结果", sort = 7,readConverterExp = "true=成功,false=失败")
    private Boolean result;

    /**
     * 操作时间
     */
    @Excel(name = "操作时间", sort = 8,dateFormat = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime opTime;

    /**
     * 详情
     */
    @Excel(name = "详情", sort = 9)
    private String detail;

}